$datestring = localtime();
print "Current data and time $datestring\n";

$epac = time();
$epac = $epac - 12*60*60;

$datestring = localtime(epac);
print "Yesterday is:$datestring\n";